<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>展示页面</title>
    <script src="js/jquery.js"></script>
    <script src="js/vue.js"></script>
</head>
<body>
<div id="app">
    <table>
        <tr>
            <td>账号</td>
            <td>密码</td>
            <td>姓名</td>
        </tr>
            <tr v-for="item in users">
                <td>{{item.loginName}}</td>
                <td>{{item.pwd}}</td>
                <td>{{item.name}}</td>
            </tr>
    </table>
</div>
</body>
<script>
    var vm = new Vue({
        el:'#app',
        data:{
            users: []
        },
        created() {
            $.ajaxSetup({
                contentType: 'application/json;charset=utf-8'
            });
            var that = this
            $.get("http://api.tutestudio.net/api/getUser", function (res) {
                var users = res.data;
                for(var i=0;i<users.length;i++){
                    that.users.push(users[i]);
                }
            })
            // this.users.push(users)
        }
    })
</script>
</html>